/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package simhya.script;

import java.io.File;
import java.util.List;

/**
 *
 * @author Administrator
 */
public class TestCommand {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Commander cmd = new CommandManager();
        cmd.setWorkingDirectory(new File("D:\\MySelf\\SimHyA\\SourceCode\\SimHyA\\model\\SIR"));
        
        //$hype_SIRSea2_1=load(model/SIR/SIRSea2.txt,hype)
        //$SIRSea2_SIM_1=simulate($hype_SIRSea2_1,hybrid,time=2400,runs=1)
        //load model
        /*
        cmd.load("hype_SIRSea2_1", "SIRSea2.txt", "hype");
        String command = "$SIRSea2_SIM_1=simulate($hype_SIRSea2_1,hybrid,time=2400,runs=1)";
        cmd.execute(command);
        */
        //1．$m=load(SIR.txt,flat) （调用txt里写好的model）
        //2．$d=simulate($m,ode,time=100) （模拟这个model）
        //3．plot($d) （图形输出）
        //cmd.load("m", "SIR.txt", "flat");
        String command = "$d=simulate($m,ode,time=100)";
        cmd.execute(command);
        
        command = "plot($d)";
        cmd.execute(command);
        
        
        /*List<String> vs = cmd.getListOfModelVariables();
        for (int i = 0; i < vs.size(); i++) {
            System.out.println(vs.get(i));
        }*/
    }

}
